Skip to content

[ImgBot] Optimize images#7

Open
imgbot[bot] wants to merge 6 commits into
mainfrom
imgbot
Open

[ImgBot] Optimize images#7
imgbot[bot] wants to merge 6 commits into
mainfrom
imgbot

Conversation

@imgbot
Copy link
Copy Markdown

@imgbot imgbot Bot commented May 17, 2026

Beep boop. Your images are optimized!

Your image file size has been reduced by 22% 🎉

Details
File Before After Percent reduction
/packages/mcp-server/assets/architecture.png 276.17kb 171.13kb 38.04%
/packages/mcp-server/assets/banner.png 232.17kb 158.33kb 31.80%
/packages/mcp-server/assets/icon.png 3.50kb 2.98kb 14.99%
/packages/extension/images/icon.png 3.50kb 2.98kb 14.99%
/packages/extension/images/gallery-banner.png 371.67kb 357.53kb 3.81%
Total : 887.02kb 692.94kb 21.88%

📝 docs | :octocat: repo | 🙋🏾 issues | 🏪 marketplace

~Imgbot - Part of Optimole family

Comment on lines +9 to +42
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Setup headless environment
run: |
sudo apt-get update
sudo apt-get install -y xvfb libasound2-dev libgtk-3-dev libnss3-dev

- name: Run tests
run: |
xvfb-run -a pnpm test

normalizeQuotes(value) {
if (this.quoteStyle === 'double' && value[0] === "'") {
const inner = value.slice(1, -1).replace(/"/g, '\\"').replace(/\\'/g, "'");
const inner = value.slice(1, -1).replace(/"/g, '\\"').replace(/\\'/g, "'");
return `"${inner}"`;
} else if (this.quoteStyle === 'single' && value[0] === '"') {
const inner = value.slice(1, -1).replace(/'/g, "\\'").replace(/\\"/g, '"');
Comment thread src/codeActions.ts
@@ -0,0 +1,367 @@
import * as vscode from 'vscode';
import { ALL_CALLABLE, FUNCTION_REGISTRY } from './functions';
@@ -0,0 +1,201 @@
import * as vscode from 'vscode';
import { FormulaFormatter, PresetName, getPresetNames, LEGACY_STYLE_MAP } from '../vendor/shared';
@@ -0,0 +1,495 @@
const fs = require('fs');
@@ -0,0 +1,495 @@
const fs = require('fs');
const path = require('path');

printCall(node, indent) {
const name = node.name.toUpperCase();
const args = node.args || [];
@@ -0,0 +1,775 @@
const fs = require('fs');
@@ -0,0 +1,775 @@
const fs = require('fs');
const path = require('path');

import { FormulaFormatterConfig, DEFAULT_CONFIG, mergeConfig } from './config';
import { PresetName, getPreset, fromLegacyStyle } from './presets';
import { validateConfig, assertValidConfig } from './validate';
// === CODE GENERATOR ===

private generate(node: ASTNode, depth: number): string {
const indent = this.getIndent(depth);

private generate(node: ASTNode, depth: number): string {
const indent = this.getIndent(depth);
const nextIndent = this.getIndent(depth + 1);
Comment on lines +169 to +179
i++;
}

let j = i;
while (j < formula.length && WHITESPACE_RE.test(formula[j])) j++;

tokens.push({
type: j < formula.length && formula[j] === '(' ? 'FUNCTION' : 'IDENTIFIER',
value: name
});
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The tokenizer in formula-minifier.js enters an infinite loop when it encounters an unrecognized character because the loop counter i is not incremented, causing the process to hang.
Severity: HIGH

Suggested Fix

Add a fallback case to the main tokenizer loop in formula-minifier.js. If no other token type matches, the loop should increment the index i to advance past the unrecognized character and continue tokenizing. This prevents the infinite loop. A similar implementation with an else { i++; } block already exists in formula-beautifier-v2.js.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: src/vendor/formula-minifier.js#L166-L179

Potential issue: The tokenizer in `formula-minifier.js` does not handle characters that
are not part of a recognized token type, such as `@`, `%`, or `~`. When such a character
is encountered, the main tokenizer loop fails to increment its index `i`. This results
in an infinite loop, causing the minification process to hang indefinitely. Because no
error is thrown, the `try-catch` block in the extension cannot prevent the application
from becoming unresponsive. This can be triggered by users pasting formulas that contain
special or unexpected characters.

Also affects:

  • src/vendor/formula-beautifier.js:164~179

Did we get this right? 👍 / 👎 to inform future reviews.

ARHAEEM and others added 6 commits May 22, 2026 13:55
Adds comprehensive sections to the README explaining how to build, compile, and package the extension.

Details the steps for creating a new release, including GitHub Actions automation for VSIX generation and upload.

Also updates the minimum required VS Code version.
Adds real-time error diagnostics, function validation, and comment warnings for formulas.
Implements comprehensive IntelliSense with auto-completion for functions and parameter hints.
Applies an Airtable-matching color scheme for accurate syntax highlighting.
Introduces v2 formatters for adaptive beautifying and safe minification, with version selection.
Extends file support for minified formulas and updates configuration options.
Overhauls release workflow for manual triggering, pre-releases, and publishing to multiple marketplaces.
Improves CI/CD caching and dependency management.
*Total -- 887.02kb -> 692.94kb (21.88%)

/packages/mcp-server/assets/architecture.png -- 276.17kb -> 171.13kb (38.04%)
/packages/mcp-server/assets/banner.png -- 232.17kb -> 158.33kb (31.8%)
/packages/mcp-server/assets/icon.png -- 3.50kb -> 2.98kb (14.99%)
/packages/extension/images/icon.png -- 3.50kb -> 2.98kb (14.99%)
/packages/extension/images/gallery-banner.png -- 371.67kb -> 357.53kb (3.81%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants